using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class procentrMap : EntityTypeConfiguration<procentr>
    {
        public procentrMap()
        {
            // Primary Key
            this.HasKey(t => new { t.Procnb, t.Class });

            // Properties
            this.Property(t => t.Procnb)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.Procedure)
                .HasMaxLength(50);

            this.Property(t => t.Modifier)
                .HasMaxLength(50);

            this.Property(t => t.Language)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.Class)
                .IsRequired()
                .HasMaxLength(250);

            // Table & Column Mappings
            this.ToTable("procentr");
            this.Property(t => t.Procnb).HasColumnName("Procnb");
            this.Property(t => t.Procedure).HasColumnName("Procedure");
            this.Property(t => t.Chart).HasColumnName("Chart");
            this.Property(t => t.QtyPric).HasColumnName("QtyPric");
            this.Property(t => t.thSurf).HasColumnName("thSurf");
            this.Property(t => t.trans_code).HasColumnName("trans_code");
            this.Property(t => t.Default).HasColumnName("Default");
            this.Property(t => t.Modifier).HasColumnName("Modifier");
            this.Property(t => t.ni).HasColumnName("ni");
            this.Property(t => t.user).HasColumnName("user");
            this.Property(t => t.Language).HasColumnName("Language");
            this.Property(t => t.Protected).HasColumnName("Protected");
            this.Property(t => t.question).HasColumnName("question");
            this.Property(t => t.Pedo).HasColumnName("Pedo");
            this.Property(t => t.qtyoh).HasColumnName("qtyoh");
            this.Property(t => t.modi_id).HasColumnName("modi_id");
            this.Property(t => t.prc_id).HasColumnName("prc_id");
            this.Property(t => t.noshow).HasColumnName("noshow");
            this.Property(t => t.Class).HasColumnName("Class");
            this.Property(t => t.cat_id).HasColumnName("cat_id");
            this.Property(t => t.ser_id).HasColumnName("ser_id");
        }
    }
}
